<?php
	class taisanthechapbs
	{
		// Các trường
		public $SoHDTC = ""; // auto_increment
		public $MaKH = "";
		public $NguoiThuaKe = "";
		public $NgaySinh = "";
		public $DiaChi = "";
		public $SoCMND = "";
		public $NgayCap = "";
		public $NoiCap = "";		
		public $SoQSDD = "";
		public $NoiCapDat = "";
		public $NgayCapDat = "";
		public $ThuaDatSo = "";
		public $MaDiaBan = "";
		public $ToBanDoSo = 0;
		public $TongDienTich = 0;
		public $GiaTriTaiSan = 0;
		public $MucChoVay = 0;

		// Các phương thức
		public function Them()
		{
			$db = new taisanthechapdb();
			return $db->Them(
							 $this->SoHDTC, 
						     $this->MaKH,
							$this->NguoiThuaKe,
							$this->NgaySinh,
							$this->DiaChi,
							$this->SoCMND,
							$this->NgayCap,
							$this->NoiCap,
							 $this->SoQSDD,
							 $this->NoiCapDat,
						     $this->NgayCapDat,
							 $this->ThuaDatSo,
							 $this->MaDiaBan,
							 $this->ToBanDoSo,
							 $this->TongDienTich,
							 $this->GiaTriTaiSan,
							 $this->MucChoVay);
		}
		
		public function CapNhat()
		{
			$db = new taisanthechapdb();
			return $db->CapNhat($this->SoHDTC, 						     	
								$this->NguoiThuaKe,
								$this->NgaySinh,
								$this->DiaChi,
								$this->SoCMND,
								$this->NgayCap,
								$this->NoiCap);
		}
		
		public function LayDanhSach()
		{
			$db = new taisanthechapdb();
			return $db->LayDanhSach($this->SoHDTC, 
						    		$this->MaKH,
									$this->NguoiThuaKe,
									$this->NgaySinh,
									$this->DiaChi,
									$this->SoCMND,
									$this->NgayCap,
									$this->NoiCap,
									$this->SoQSDD,
							 		$this->NoiCapDat,
						     		$this->NgayCapDat,
							 		$this->ThuaDatSo,
							 		$this->MaDiaBan,
							 		$this->ToBanDoSo,
							 		$this->TongDienTich,
							 		$this->GiaTriTaiSan,
								 	$this->MucChoVay);
		}
	}
?>